package com.mls.guardian.appst;

import com.mls.guardian.appst.chain.TaskResult;
import com.mls.guardian.appst.shell.ShellResultListener;
import com.mls.guardian.appst.shell.ShellScriptExecutor;
import com.mls.guardian.appst.shell.ShellScriptExecutorFuture;
import com.mls.guardian.common.OSPlatform;
import com.mls.guardian.common.OSUtil;
import com.mls.guardian.common.SvnUtil;

import java.io.*;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ExecutionException;

/**
 * Created by 2014-400 on 2015-10-20.
 */
public class TestSSH {
    public static void main(String[] args) {
//        List<String> list = new ArrayList<String>();
//        list.add("d:");
//        list.add("cd d:\\BaiduYunDownload");
//        list.add("copy VS2010SP1dvd1.iso test.iso /y");//耗时操作
////        list.add("echo hello");
////        list.add("copy VS2008ProEdition90DayTrialCHSX1435983.iso test.iso /y");//耗时操作
////        list.add("echo world");
////        list.add("copy cn_visual_studio_2010_ultimate_x86_dvd_532347.iso test.iso /y");//耗时操作
//        list.add("ls -al");//报错命令
//        list.add("cd d:\\Software");
//        list.add("dir");
//        list.add("exit");
//
//        list.clear();
//        list.add("gradle  D:\\WmsSource\\Java\\WMSPlatform\\BaseComServer\\build.gradle");
//        list.add("exit");
//        try {
//            TaskResult result = new ShellScriptExecutorFuture(list).execute();
//            System.out.println("result:" + result.isSuc() + ";out:" + result.getOut() + ";error:" + result.getError() + System.currentTimeMillis());
//        } catch (ExecutionException e) {
//            e.printStackTrace();
//        } catch (InterruptedException e) {
//            e.printStackTrace();
//        }
        System.out.println(SvnUtil.getLastVersion("http://svn.meilishuo.com/repos/wms/Java/BMSPlatform", "yangliurd", "p@s0rd123"));
    }
}



